﻿#include <string>
#include <iostream>
#include "StringHelper.h"


using namespace sky;
using namespace std;


int main() 
{
    // string str;
    // StringHelper::format(str, "%d %d", 11, 12);

    // cout << str << endl;

    std::string s1;
    StringHelper::format(s1, "ab中文c%04d", 789);
    cout << s1 << endl;
    StringHelper::toUpper(s1);
    cout << s1 << endl;
    StringHelper::toLower(s1);
    cout << s1 << endl;
    int n = StringHelper::toInt("1234567890");
    __int64 n64 = StringHelper::toInt64("1234567890123");
    float ff = StringHelper::toFloat("3.141592600");

    std::string sss;
    StringHelper::fromInt(sss, n);
    StringHelper::fromInt64(sss, n64);
    StringHelper::fromFloat(sss, ff);

    const char* str = " a ,,	b	, c	,	d ,e,f,g ";
    std::vector<std::string> v;
    StringHelper::split(v, str, ',', " \t");

    const char * pch = "hello";
    cout << mchar_traits_ex::length(pch) << endl;

    
    return 0;
}